package com.ty.day5;

import java.util.Arrays;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/10 9:06
 */
public class One {
    public static void main(String[] args) {
        int[] a = {1,5,4,3,2,6,7,8,9,0};
        System.out.println(Arrays.toString(a));
        for (int i = 0; i < a.length; i++) {
            for (int j = 0; j < a.length-i-1; j++) {
                if (a[j]>a[j+1]){
                    int t =a[j];
                    a[j]=a[j+1];
                    a[j+1]=t;
                }
            }
        }
        System.out.println(Arrays.toString(a));
    }
}
